package com.hospital.search.module.base;

/**
 * 排序类型枚举
 * 0: 升序
 * 1: 降序
 * @author yhn
 * @version 1.0
 */
public enum SortFlag {
    ASC(0),
    DESC(1);
    public final Integer value;
    SortFlag(Integer value) {
        this.value = value;
    }
    public static SortFlag getByValue(Integer value) {
        for (SortFlag flag : values()) {
            if (flag.value.equals(value)) {
                return flag;
            }
        }
        return null;
    }
}
